package pub.wkq.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import pub.wkq.utils.QRCodeGenerator;

import java.awt.*;
import java.util.UUID;

@RestController
public class TestController {
    /**
     * 生成二维码,并返回二维码地址
     */
    @GetMapping("createQrCode")
    public String createQrCode(String text, Color foregroundColor, Color backgroundColor) {
        return QRCodeGenerator.generateQRCodeAndUploadToOSS(text, foregroundColor, backgroundColor);
    }
}
